package com.ehotting.edsta.diagnosisPredict.feign.factory;

import com.ehotting.eaf.core.web.domain.diagnosisPredict.PageDto;
import com.ehotting.eaf.core.web.domain.diagnosisPredict.Response;
import com.ehotting.edsta.diagnosisPredict.domain.dto.FeLine;
import com.ehotting.edsta.diagnosisPredict.feign.FeLineFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 算子连接线段的降级处理
 * 
 * @author edsta
 */
@Slf4j
@Component
public class FeLineFallbackFactory implements FallbackFactory<FeLineFeignService> {

    @Override
    public FeLineFeignService create(Throwable throwable)
    {
        log.error("算子连接线段调用失败:{}", throwable.getMessage());
        return new FeLineFeignService() {
            @Override
            public Response<String> deLeteByIds(String ids) {
                return null;
            }

            @Override
            public Response<FeLine> getById(Long id) {
                return null;
            }

            @Override
            public Response<List<FeLine>> list(Long canvasId, Long cid, String createTime, Long id, String lineParams, Long pid) {
                return null;
            }

            @Override
            public Response<PageDto<FeLine>> pageList(Long canvasId, Long cid, String createTime, Long id, String lineParams, Long pid) {
                return null;
            }

            @Override
            public Response<FeLine> save(FeLine feLine) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdate(FeLine feLine) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdateBatch(FeLine[] feLine) {
                return null;
            }

            @Override
            public Response<String> update(FeLine feLine) {
                return null;
            }

            @Override
            public Response<String> updateList(FeLine[] feLine) {
                return null;
            }
        };
    }
}
